package com.xiaocg.base;

/**
 * @author xiaocg
 */
public class Ticket {

    private int number = 30;
    public synchronized int sailTicket(){
        while (number>0){
            System.out.println(Thread.currentThread().getName()+" :: "+number);
            return number--;
        }
        return number;
    }


}
